home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / April 96 / Re ODPart --> BaseShape.1 < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.4 KB  |  [TEXT/ttxt]

  1. Subject:     RE: ODPart --> BaseShape
  2. Sent:        4/14/96 3:47 PM
  3. Received:    4/15/96 8:32 AM
  4. From:        Chris Hunt, chris_hunt@yes.optus.com.au
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. Harald Stegavik wrote:
  9.  
  10. >I want the (draw-based container) to draw lines between 
  11. >these ODParts (not wrappers), but have problems in finding
  12. >their bounding rects/positions in the containing part. 
  13. >I'm shure there is a easy solution to this, but I'm somehow
  14. >getting to close and messing things up (not having the complete
  15. >picture of the graphical model of ODF+OD, which is wery well
  16. >documented indeed).
  17.  
  18. I've done something similar with ODFDraw.  Note that the embedded ODPart is represented by CProxyShape (its not clear if you do know this).
  19.  
  20. When a line's end point lands anywhere inside the CProxyShape's bounds (using its hit detection method), I determine the centre of the proxy shape and change the line end point to point to the centre; the centering is just a cosmetic thing that I need to achieve though.  I then request that the line shape be moved under the proxy shape (methods for this are against the FW_CPart specialisation I think).  This gives the visual appearance of the line being drawn to the edge of the embedded part.
  21.  
  22. I hope that this helps.
  23.  
  24. Regards,
  25.  
  26. Christopher Hunt
  27. Class Action Pty. Ltd.
  28. Wollongong, NSW, Australia
  29.